var Block = function (file, datanodes, id) {
	this.file = file;
	this.datanodes = datanodes;
	this.id = id;

	this.currentReplicated = 0;
	this.minReplicated = 3;
	
	this.blockSize = 64e6;
	this.used = 0;
};

Block.prototype.print = function (writer) {
	
	writer(JSON.stringify({
		BlockId: this.id,
		R: this.currentReplicated,
		minR: this.minReplicated,
		BS: this.blocksize,
		Used: this.used,
		DN: this.datanodes.map(function (x) {return x.ipAddress;}).join(",")
	}, null, 2));
};	